package chapter02;

public class Training06 {
    public static void main(String[] args) {
        int height = 15;
        printEquilateralTriangle(height);
    }

    public static void printEquilateralTriangle(int height) {
        for (int i = 1; i <= height; i++) {

            for (int j = 1; j <= height - i; j++) {
                System.out.print(" ");
            }

            for (int k = 1; k <= 2 * i - 1; k++) {
                System.out.print("*");
            }

            System.out.println();
        }
    }
}